package com.hbnu.test.www;

import java.util.Scanner;

public class encrypt_test {
    public static void main(String[] args) {
        //创建6位数
        int[] arr = new int[7];
        Scanner scanner = new Scanner(System.in);
        arr[0] = scanner.nextInt();
        //六位数解体+加密
        int i ;
        int t = 100000;
        for (i = 1; i < arr.length;i++) {
            //分离出当前位
            //1.
            arr[i] = arr[0];
            arr[i] /= t;//因为分离出的数最后一位就是所求数字，所以分离时可以不对其取余
            t /= 10;
            //先步加密
            arr[i] += 5;
            arr[i] = arr[i] % 10;
        }
        for(i = 1;i < arr.length;i++){
            System.out.print(arr[i]);
        }
        System.out.println();
        //换位
        int temp ;
        for (i = 1; i <= arr.length / 2; i++) {
            temp = arr[i];
            arr[i] = arr[arr.length-i];
            arr[arr.length-i] = temp;
        }
        //输出
        for(i = 1;i < arr.length;i++){
            System.out.print(arr[i]);
        }
    }
}
